package com.wfs.suanfa.lock;

import org.apache.poi.ss.formula.functions.T;

import java.util.concurrent.CountDownLatch;

/**
 * @author: wfs
 * @Date: 2021/1/6 22:16
 * @Description:
 */
public class TestCountDownLatch {
    public static void main(String[] args) {
        Thread[] threads=new Thread[100];
        CountDownLatch latch=new CountDownLatch(threads.length);
        for (int i = 0; i < threads.length; i++) {
            threads[i]=new Thread(new Runnable() {
                @Override
                public void run() {
                    latch.countDown();
                }
            });
        }
    }
}
